.MODEL small
.586
EXTRN lirent:proc, ecrent:proc
EXTRN ecrbool:proc
EXTRN ecrch:proc, ligsuiv:proc
.CODE

max:

enter 6,0

push word ptr [bp+6]

pop ax
mov [bp+-6],ax

push word ptr [bp+-6]

push word ptr [bp+4]

pop ax
cmp ax,0 jeaut1

push word ptr [bp+-6]

pop ax
mov [bp+8],ax

jmp fmax

jmp fsi1

aut1:

push word ptr [bp+4]

pop ax
mov [bp+8],ax

jmp fmax

fsi1:

fmax:

ret 4
leave

min:

enter 0,0

push word ptr [bp+6]

push word ptr [bp+4]

pop ax
cmp ax,0 jeaut2

push word ptr [bp+6]

pop ax
mov [bp+8],ax

jmp fmin

jmp fsi2

aut2:

push word ptr [bp+4]

pop ax
mov [bp+8],ax

jmp fmin

fsi2:

fmin:

ret 4
leave

sup:

enter 0,0

push word ptr [bp+6]

push word ptr [bp+4]

pop ax
mov [bp+8],ax

jmp fsup

fsup:

ret 4
leave

debut:
STARTUPCODE

enter 8,0

push word ptr 5

pop ax
mov [bp+-2],ax

lea dx,[bp+-4]
push word ptr dx
call lirent

call ligsuiv

push word ptr [bp+-2]

push word ptr [bp+-4]

push word ptr 5

call min

call max

push word ptr 2

pop ax
pop bx
add bx,ax
 push word ptr ax

pop ax
mov [bp+-6],ax

push word ptr 1

push word ptr [bp+-2]

push word ptr [bp+-4]

push word ptr 5

pop bx
pop ax
sub bx,ax
 push word ptr ax

call max

pop ax
pop bx
add bx,ax
 push word ptr ax

push word ptr [bp+-2]

push word ptr 2

pop ax
pop bx
imul bx,ax
 push word ptr ax

push word ptr [bp+-4]

call min

call sup

pop ax
mov [bp+-8],ax

call ligsuiv

push word ptr [bp+-6]

call ecrent

call ligsuiv

push word ptr [bp+-8]

call ecrbool

fprinc:

EXITCODE
end debut
